<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui">
    <div class="sidebar_divider_1"></div>
    <ul>
        <li class="clearFix widget search_listing">
            <div class="filter_listing_head"></div>
            <div class="filter_listing_body">
                <div class="search_side_form">
                    <div class="search_side_field">
                        <p><h:outputLabel value="#{msgs['search.listing']}:"/></p>
                        <p>
                        <h:form id="frmSSFather">
                            <ul>
                                <li>
                                    <input type="radio" name="searchListing" id="rSellingHouse" value="rSellingHouse" onchange="showSearchSellingHouse()"/>
                                    <label for="rSellingHouse">#{msgs['search.listing.sellinghouse']}</label>
                                </li>
                                <li>
                                    <input type="radio" name="searchListing" id="rRentalBasis" value="rRentalBasis" onchange="showSearchRentalBasis()"/>
                                    <label for="rRentalBasis">#{msgs['search.listing.rentalbasis']}</label>
                                </li>
                                <li>
                                    <input type="radio" name="searchListing" id="rPayingGuest" value="rPayingGuest" onchange="showSearchPayingGuest()"/>
                                    <label for="rPayingGuest">#{msgs['search.listing.payingguest']}</label>
                                </li>
                            </ul>
                        </h:form>
                        </p>
                    </div>
                    <div id="search_side_sellinghouse">
                        <h:form id="frmSSSellingHouse">
                            <p:remoteCommand name="submitSellingHouseController" update="growl" action="#{sellingHouseController.search}"/>
                            <div class="search_side_field">
                                <p><h:outputLabel for="city" value="#{msgs['search.city']}:"/></p>
                                <p><p:inputText value="#{sellingHouseController.criteria.city}" id="city"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel for="location" value="#{msgs['search.location']}:"/></p>
                                <p><p:inputText value="#{sellingHouseController.criteria.location}" id="location"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.price']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{sellingHouseController.criteria.priceMin}" label="#{msgs['search.priceMin']}" id="priceMin" required="true" >
                                    <f:validateLongRange minimum="0" maximum="500000" />
                                </p:inputText>&nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{sellingHouseController.criteria.priceMax}" label="#{msgs['search.priceMax']}" id="priceMax"  required="true">
                                    <f:validateLongRange minimum="0" maximum="500000" />
                                </p:inputText></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.squareFootage']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{sellingHouseController.criteria.squareFootageMin}" label="#{msgs['search.squareFootageMin']}" id="squareFootageMin"  required="true">
                                    <f:validateLongRange minimum="0" maximum="1000" />
                                </p:inputText>&nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{sellingHouseController.criteria.squareFootageMax}" label="#{msgs['search.squareFootageMax']}" id="squareFootageMax" required="true">
                                    <f:validateLongRange minimum="0" maximum="1000" />
                                </p:inputText></p>
                            </div>
                            <div class="search_side_field"><p>
                                <h:outputLabel for="noBedrooms" value="#{msgs['search.noBedrooms']}: "/>
                                <p:inputText style="width:10%" id="noBedrooms" value="#{sellingHouseController.criteria.noBedroomsMin}" label="#{msgs['search.noBedrooms']}"  required="true">
                                    <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText>+</p>
                            </div>
                            <div class="search_side_field"><p>
                                <h:outputLabel for="noBathrooms" value="#{msgs['search.noBathrooms']}: "/>
                                <p:inputText style="width:10%" id="noBathrooms" value="#{sellingHouseController.criteria.noBathroomsMin}" label="#{msgs['search.noBathrooms']}" required="true">
                                    <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText>+</p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel for="houseTypes" value="#{msgs['search.houseTypes']}:"/></p>
                                <p>
                                <h:selectOneMenu id="houseTypes" value="#{sellingHouseController.criteria.houseType}">
                                    <f:selectItem itemValue="" itemLabel="(Any)" />
                                    <f:selectItems value="#{sellingHouseController.houseTypes}" var="houseType" itemLabel="#{houseType.houseTypeName}"/>
                                </h:selectOneMenu> </p>
                            </div>
                            <p class="button_filter_listing">
                            <div onclick="submitSellingHouseController()" class="start_search_button"></div>
                            </p>
                        </h:form>
                    </div>
                    <div id="search_side_rentalbasis">
                        <h:form id="frmSSRentalBasis">
                            <p:remoteCommand name="submitRentalBasisController" update="growl" action="#{rentalBasisController.search}"/>
                            <div class="search_side_field">
                                <p><h:outputLabel for="city" value="#{msgs['search.city']}:"/></p>
                                <p><p:inputText value="#{rentalBasisController.criteria.city}" id="city"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel for="location" value="#{msgs['search.location']}:"/></p>
                                <p><p:inputText value="#{rentalBasisController.criteria.location}" id="location"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.deposit']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{rentalBasisController.criteria.depositMin}" label="#{msgs['search.depositMin']}" id="depositMin" required="true">
                                    <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText> &nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{rentalBasisController.criteria.depositMax}" label="#{msgs['search.depositMax']}" id="depositMax" required="true">
                                    <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.rent']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{rentalBasisController.criteria.rentMin}" label="#{msgs['search.rentMin']}" id="rentMin" required="true">
                                <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText> &nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{rentalBasisController.criteria.rentMax}" label="#{msgs['search.rentMax']}" id="rentMax" required="true">
                                <f:validateLongRange minimum="0" maximum="100" />
                                </p:inputText></p>
                            </div>
                            <div class="search_side_field"><p>
                                <h:outputLabel for="noBedrooms" value="#{msgs['search.noBedrooms']}: "/>
                                <p:inputText style="width:10%" id="noBedrooms" value="#{rentalBasisController.criteria.noBedroomsMin}" label="#{msgs['search.noBedrooms']}" required="true"/>+</p>
                            </div>
                            <div class="search_side_field"><p>
                                <h:outputLabel for="noBathrooms" value="#{msgs['search.noBathrooms']}: "/>
                                <p:inputText style="width:10%" id="noBathrooms" value="#{rentalBasisController.criteria.noBathroomsMin}" label="#{msgs['search.noBathrooms']}" required="true"/>+</p>
                            </div>
                            <p class="button_filter_listing">
                            <div onclick="submitRentalBasisController()" class="start_search_button"></div>
                            </p>
                        </h:form>
                    </div>
                    <div id="search_side_payingguest">
                        <h:form id="frmSSPayingGuest">
                            <p:remoteCommand name="submitPayingGuestController" update="growl" action="#{payingGuestController.search}"/>
                            <div class="search_side_field">
                                <p><h:outputLabel for="city" value="#{msgs['search.city']}:"/></p>
                                <p><p:inputText value="#{payingGuestController.criteria.city}" id="city"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel for="location" value="#{msgs['search.location']}:"/></p>
                                <p><p:inputText value="#{payingGuestController.criteria.location}" id="location"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.deposit']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{payingGuestController.criteria.depositMin}" label="#{msgs['search.depositMin']}" id="depositMin" required="true"/>&nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{payingGuestController.criteria.depositMax}" label="#{msgs['search.depositMax']}" id="depositMax" required="true"/></p>
                            </div>
                            <div class="search_side_field">
                                <p><h:outputLabel value="#{msgs['search.rent']}:"/></p>
                                <p><p:inputText style="width:35%" value="#{payingGuestController.criteria.rentMin}" label="#{msgs['search.rentMin']}" id="rentMin" required="true"/>&nbsp;to&nbsp;
                                <p:inputText style="width:35%" value="#{payingGuestController.criteria.rentMax}" label="#{msgs['search.rentMax']}" id="rentMax" required="true"/></p>
                            </div>
                            <p class="button_filter_listing">
                            <div onclick="submitPayingGuestController()" class="start_search_button"></div>
                            </p>
                        </h:form>
                    </div>

                </div>
            </div>
            <div class="filter_listing_footer"></div>

        </li>
    </ul>

</ui:composition>